const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  // 配置代理,解决跨域请求问题
  // 注意: 配置后必须重启项目
  devServer:{
    proxy:{
      //首页接口
      '/jmapi':{
        target:"https://api.dangdang.com",
        ws:false,
        changeOrigin:true
      },
      //猜你喜欢接口
      '/cart.php':{
        target:"http://cart.m.dangdang.com",
        ws:false,
        changeOrigin:true
      },
      //详情接口
      '/h5ajax.php':{
        target:"http://product.m.dangdang.com",
        ws:false,
        changeOrigin:true
      },
      './json':{
        target:"http://192.168.37.17:8080/",
        ws:false,
        changeOrigin:true
      },
      //http://192.168.37.17:8080/./json/
      //http://cart.m.dangdang.com
      //http://api.dangdang.com/jmapi/cms/indexData?client_version=1.0&user_client=touch&permanent_id=20221115143142050182866141022930937&udid=326edd64ae4cfa273cab9b6e7c7baf93&timestamp=1668597916707&union_id=&unionId=&cv=1.0&ct=touch&ts=1668597916707&time_code=286b6585fe5823cb87ebbc56eea8867f&tc=86ad8103a0ef6ba462a4058927effb76&pageFloorId=1775_23978
      //http://product.m.dangdang.com/h5ajax.php?action=get_product_info&pid=  24166970  &city_id=5&province_id=144&district_id=518&town_id=51801
      //http://product.m.dangdang.com/h5ajax.php?action=get_product_info&pid=  26490676  &city_id=5&province_id=144&district_id=518&town_id=51801
    }
  }
})
